package com.study.edoc.controller;


import com.study.edoc.exception.R;
import com.study.edoc.pojo.Category;
import com.study.edoc.service.CategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api/v1/category")
@Api(tags = "电子文档分类模块",description = "电子文档分类模块相关接口")
public class CategoryController {

    @Resource
    private CategoryService categoryService;


    @ApiOperation(value="获取所有电子文档分类")
    @GetMapping("/list")
    public R listCategory(){
        List<Category> categoryList = categoryService.findCategoryList();
        return R.success(categoryList);
    }

}
